/**
 *  date_get()
 *  cti datum
 */
void date_get(struct Date far *d) {
	if(d) {
    d->dayofweek = bcd_read(6);
    d->day       = bcd_read(7);
    d->month     = bcd_read(8);
    d->year      = bcd_read(0x32)*100 + bcd_read(0x09);
  }
  return;
}

/**
 *  date_set()
 *  zapis datum
 */
void date_set(struct Date far *d) {
	if(d) {
    bcd_write(0x32, d->year/100);
    bcd_write(9, d->year%100);
    bcd_write(8, d->month);
    bcd_write(7, d->day);
    bcd_write(6, d->dayofweek);
  }
  return;
}
